<?php
/* @var $this XController */
$this->pageTitle = '用户信息';
?>
<table class="post">
  <tbody>
    <tr>
      <td width="100">用户名：</td>
      <td><?php echo $this->user->username;?></td>
    </tr>
    <tr>
      <td>姓　名：</td>
      <td><?php echo $this->user->realname;?></td>
    </tr>
    <tr>
      <td>角　色：</td>
      <td><?php echo $this->user->honor;?></td>
    </tr>
    <tr>
      <td>权　限：</td>
      <td>
        <?php foreach ($menu as $ctrlKey => $ctrl):?>
        <ul class="acl">
          <li class="ctrl"><label><span><?php echo $ctrl['title'];?></span></label></li>
          <?php if (is_array($ctrl['actions'])):?>
          <li class="acts">
            <?php foreach ($ctrl['actions'] as $actKey => $act):?>
            <?php if (!isset($act['acl']) || $act['acl'] !== false):?>
            <label><span><?php echo $act['title'];?></span></label>
            <?php endif;?>
            <?php endforeach;?>
          </li>
          <?php endif;?>
        </ul>
        <?php endforeach;?>
      </td>
    </tr>
  </tbody>
</table>
